
str=''
Dir.foreach('test\reports') {|x| str=str+','+"#{x}"}
fileArr=str.split(",")
len=fileArr.length
filecount=3
str1=""
while filecount<len   
    counter = 1
    file = File.new('test\\reports\\'+fileArr[filecount], "r")
    while (line = file.gets)
      if (counter !=1)
        str1 =str1+"#{line}"
      end
      counter = counter + 1
    end
    file.close      
  filecount +=1
end
str1='<?xml version="1.0" encoding="UTF-8"?><summary>'+str1+'</summary>'
 File.open('test\\summary\\summary.xml', 'w+') do |f2|  
    f2.puts str1
 end